<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>短租</title>
    <mystyle>
    <link href="/static/static/css/style.css" rel="stylesheet" type="text/css">
    </mystyle>
</head>
<body>
<!--通用头部-start-->
<div id="selectBox" class="msfont">
    <div class="w1217 center clearfix">
        <div class="selectItem pull-left">
            <span class='pull-left labels'>目的地</span>

            <div class="select pull-left">
                <div class="text" id="area" name="area">不限</div>
                <div class="larrow"><i class="fa fa-caret-down"></i></div>
                <ul class="dropmenu">
                    <li>不限</li>
                    <li>三亚</li>
                    <li>苏州</li>
                    <li>丽江</li>
                    <li>西双版纳</li>
                    <li>深圳</li>
                    <li>广州</li>
                    <li>成都</li>
                    <li>昆明</li>
                </ul>
            </div>
        </div>
        <div class="selectItem pull-left">
            <span class='pull-left labels'>周次</span>

            <div class="select pull-left">
                <div class="text" id="week" name="week">不限</div>
                <div class="larrow"><i class="fa fa-caret-down"></i></div>
                <ul class="dropmenu">
                    <li>不限</li>
                    <li>黄金周</li>
                    <li>旺季周</li>
                    <li>平季周</li>
                    <li>淡季周</li>
                </ul>
            </div>
        </div>
        <div class="selectItem pull-left">
            <span class='pull-left labels'>主题</span>

            <div class="select pull-left">
                <div class="text" id="themes" name="themes">不限</div>
                <div class="larrow"><i class="fa fa-caret-down"></i></div>
                <ul class="dropmenu">
                    <li>不限</li>
                    <li>高尔夫</li>
                    <li>沙滩</li>
                    <li>湖景</li>
                    <li>雪山</li>
                    <li>古镇</li>
                    <li>避寒</li>
                    <li>避暑</li>
                    <li>温泉</li>
                </ul>
            </div>
        </div>
        <div class="selectItem pull-left">
            <span class='pull-left labels'>价格</span>

            <div class="select pull-left">
                <input type="text" id="price" name="price" value=" 不限" maxlength="4" onkeyup='this.value=this.value.replace(/\D/gi,"")'/>
            </div>
        </div>
    </div>
</div>
<!--开始-->
<div id="listData">
    <jsp:include page="listdata.jsp"></jsp:include>
</div>
</body>

<script type="text/javascript" src="/static/static/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">


    function search() {
        var area = $("#area").html();
        var week = $("#week").html();
        var price = $("#price").val();
        var themes = $("#themes").html();
        $("#listData").empty();
        $("#listData").load("/rent/search", {area: area, week: week, price: price, themes: themes});
    }


    $(function () {
        getUserInfo();
        $('.cnInUl ul li').click(function (e) {
            $(this).addClass('current').siblings().removeClass('current');
        });
        /*nameDetail*/
        $('.nameDetail').css('display', 'none');
        $('.personName').hover(function (e) {
            $('.nameDetail').css('display', 'block');
        }, function () {
            $('.nameDetail').css('display', 'none');
        });

    })


    function getUserInfo() {
//            location.href="/public/userinfo";
        $.ajax({
            url: "/front/user_info/userinfo",
            success: function (data) {
                var userName = data.username;
                $("#userName").html(userName);
                var imageGuid = data.imageGuid;
                if (imageGuid != null) {
                    $("#noLogin").hide();
                    var url = "/public/image/" + imageGuid;
                    $("#userName_1").html("Hi," + data.username);
                    $("#userName_2").html(data.username);
                    $("#useImage").attr("src", url);
                }
            }
        });
    }

    function userDetails() {
        location.href = "/front/user_info/form";
    }

</script>

</html>